/*
 * @Author: Kevin Zhao
 * @Date: 2021-09-21 23:14:18
 * @LastEditTime: 2021-12-11 14:12:48
 * @LastEditors: Kevin Zhao
 * @Description: 用户评价页接口
 * @FilePath: \uniapp-pro\src\api\comment.ts
 */
import request from '../server/request'
import { sessionIdInterface } from './config/interface'

interface CommentInterface extends sessionIdInterface {
    productCommentStar: number | string,
    productCommentContent: string,
    productCommentFlow: number | string,
}

interface CommentFlowInterface extends sessionIdInterface {
    productCommentFlow: number | string,
}

/**
 * @description: 增加评论
 * @param {CommentInterface} params
 * @return {*}
 */
export const addCommentAPI = (params: CommentInterface): any => {
    return request(params, 'addProductComment')
}

/**
 * @description: 查询评论列表
 * @param {CommentFlowInterface} params
 * @return {*}
 */
export const getCommentListAPI = (params: CommentFlowInterface): any => {
    return request(params, 'getMyProductCommentList')
}